package com.yao.yaoojcodesandbox.security;

import cn.hutool.core.io.FileUtil;

import java.io.File;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.List;

public class TestSecurityManager {
    public static void main(String[] args) {
        System.setSecurityManager(new MySecurityManager());
        //测试写权限
        FileUtil.writeString("aa","aaa",Charset.defaultCharset());
        //测试读权限
        //List<String> strings = FileUtil.readLines("D:\\星球项目\\OJ\\第一期\\yaooj-code-sandbox\\src\\main\\resources\\application.yml", StandardCharsets.UTF_8);
        //System.out.println(strings);
    }
}
